package com.iatinspur.dubbo.service;

import org.apache.dubbo.common.stream.StreamObserver;
import org.apache.dubbo.remoting.exchange.Response;

public interface ProviderStreamService {


    /**
     * 用于服务端实现
     * @param param
     * @param response
     */
    default void dubboServerStream(String param, StreamObserver<String> response){}


    /**
     * 用于客户端实现
     * @param response
     * @return
     */
    default StreamObserver<String> dubboClientStream(StreamObserver<String> response){
        return response;
    }


    /**
     * 用于服务端实现
     * @param param
     * @param response
     */
    default void dubboServerStream2(String param, StreamObserver<Response> response){}




}
